import service from '../utils/request'

export function fetchClassByCondition (data) {
    return service({
        url: '/class/select',
        method: 'post',
        data
    })
}

// 查询
export function fetchClass (data) {
    return service({
        url: '/class/select',
        method: 'post',
        data
    })
}

// 删除
export function deleteClass (params) {
    return service({
        url: `/class/${params}`,
        method: 'delete'
    })
}

// 更新
export function editClass (data) {
    return service({
        url: '/class',
        method: 'put',
        data
    })
}

export function addClass (data) {
    return service({
        url: '/class',
        method: 'post',
        data
    })
}